/* ============================================
   WorldBestBook.com - Main Stylesheet
   Modern Book Marketplace Theme
   ============================================ */

/* CSS Variables */
:root {
    --primary: #8B4513;
    --primary-dark: #6B3410;
    --primary-light: #A0522D;
    --secondary: #D4A574;
    --accent: #C9943E;
    --accent-light: #F5DEB3;
    --bg-cream: #FDF8F0;
    --bg-white: #FFFFFF;
    --bg-light: #F7F3ED;
    --text-dark: #2C1810;
    --text-body: #4A3728;
    --text-muted: #8B7355;
    --text-light: #B8A08A;
    --border: #E8DDD0;
    --success: #28A745;
    --warning: #F0AD4E;
    --danger: #DC3545;
    --info: #17A2B8;
    --shadow: 0 2px 10px rgba(44, 24, 16, 0.08);
    --shadow-md: 0 4px 20px rgba(44, 24, 16, 0.12);
    --shadow-lg: 0 8px 40px rgba(44, 24, 16, 0.16);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--bg-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

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

/* Top Bar */
.top-bar {
    background: var(--text-dark);
    color: var(--accent-light);
    font-size: 0.8rem;
    padding: 6px 0;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left span { margin-right: 20px; }
.top-bar-left i, .top-bar-right i { margin-right: 5px; }
.top-bar-right a {
    color: var(--accent-light);
    margin-left: 15px;
}
.top-bar-right a:hover { color: white; }

/* Main Header */
.main-header {
    background: var(--bg-white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    flex-shrink: 0;
}
.logo i { font-size: 2rem; color: var(--accent); }
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1.1;
}
.logo-tagline { font-size: 0.7rem; color: var(--text-muted); display: block; }

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 500px;
    display: flex;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,69,19,0.1); }
.search-bar input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: transparent;
}
.search-bar button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.search-bar button:hover { background: var(--primary-dark); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.header-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-body);
    font-size: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.header-btn i { font-size: 1.3rem; }
.header-btn:hover { color: var(--primary); background: var(--bg-light); }
.cart-btn { position: relative; }
.cart-badge {
    position: absolute;
    top: -2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Dropdown */
.header-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: none;
    z-index: 100;
    padding: 8px 0;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-body);
    font-size: 0.9rem;
}
.dropdown-menu a:hover { background: var(--bg-light); color: var(--primary); }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-dark); }

/* Navigation */
.main-nav {
    background: var(--primary);
    padding: 0;
}
.nav-links {
    display: flex;
    align-items: center;
}
.nav-links > li > a {
    display: block;
    padding: 12px 18px;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}
.sell-btn {
    background: var(--accent) !important;
    color: white !important;
    border-radius: 20px !important;
    margin-left: 10px;
    padding: 8px 20px !important;
}
.sell-btn:hover { background: #B8842E !important; }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 100;
    padding: 8px 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-body);
    font-size: 0.9rem;
}
.nav-dropdown-menu a:hover { background: var(--bg-light); color: var(--primary); }
.nav-dropdown-menu a i { width: 20px; color: var(--primary); }

/* Flash Messages */
.flash-message {
    padding: 12px 0;
    font-size: 0.9rem;
    position: relative;
}
.flash-message .container { display: flex; justify-content: space-between; align-items: center; }
.flash-success { background: #D4EDDA; color: #155724; }
.flash-error { background: #F8D7DA; color: #721C24; }
.flash-warning { background: #FFF3CD; color: #856404; }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.7; }

/* ============== HERO SECTION ============== */
.hero {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><circle cx="40" cy="40" r="1" fill="rgba(255,255,255,0.03)"/></svg>') repeat;
}
.hero .container { position: relative; z-index: 1; }
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 15px;
}
.hero-text h1 span { color: var(--accent); }
.hero-text p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 25px;
    max-width: 480px;
}
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}
.hero-stat .label { font-size: 0.85rem; opacity: 0.7; }

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-books {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    transform: perspective(1000px) rotateY(-5deg);
}
.hero-book-card {
    background: white;
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.hero-book-card:hover { transform: translateY(-5px); }
.hero-book-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    text-align: center;
    justify-content: center;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #B8842E; color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #C82333; color: white; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #218838; color: white; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 15px 35px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

/* ============== SECTIONS ============== */
.section {
    padding: 60px 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-dark);
}
.section-title span { color: var(--primary); }
.view-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}
.view-all:hover { color: var(--primary-dark); }

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px 15px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.category-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}
.category-card span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Book Cards Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}
.book-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}
.book-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.book-card-image {
    position: relative;
    padding-top: 140%;
    background: var(--bg-light);
    overflow: hidden;
}
.book-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.book-card:hover .book-card-image img { transform: scale(1.05); }
.book-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}
.badge-success { background: var(--success); color: white; }
.badge-info { background: var(--info); color: white; }
.badge-warning { background: var(--warning); color: var(--text-dark); }
.badge-secondary { background: #6c757d; color: white; }
.book-card-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.book-card-actions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}
.book-card:hover .book-card-actions { opacity: 1; transform: translateX(-50%) translateY(0); }
.book-card-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.book-card-actions button:hover { background: var(--primary); color: white; }
.book-card-info {
    padding: 15px;
}
.book-card-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.book-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-dark);
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-card-title a { color: inherit; }
.book-card-title a:hover { color: var(--primary); }
.book-card-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.book-card-rating {
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 8px;
}
.book-card-rating span { color: var(--text-muted); margin-left: 5px; }
.book-card-price {
    display: flex;
    align-items: center;
    gap: 8px;
}
.book-card-price .current {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}
.book-card-price .original {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}
.book-card-seller {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.book-card-seller i { margin-right: 4px; }

/* Features Bar */
.features-bar {
    background: var(--bg-white);
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}
.feature-item i {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
}
.feature-item h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.feature-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 50px 0;
    color: white;
    text-align: center;
}
.newsletter h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.newsletter p { opacity: 0.85; margin-bottom: 25px; }
.newsletter-form {
    display: flex;
    max-width: 450px;
    margin: 0 auto;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.newsletter-form input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-family: var(--font-body);
}
.newsletter-form button {
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.newsletter-form button:hover { background: #B8842E; }

/* ============== PAGE LAYOUTS ============== */
.page-header {
    background: linear-gradient(135deg, var(--text-dark), var(--primary-dark));
    color: white;
    padding: 40px 0;
    text-align: center;
}
.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.8;
}
.breadcrumb a { color: var(--accent-light); }

/* Books Page Layout */
.books-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 40px 0;
}

/* Sidebar Filters */
.sidebar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
}
.sidebar h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-body);
}
.filter-group label:hover { color: var(--primary); }
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
    accent-color: var(--primary);
}
.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}
.price-range input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Sort bar */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-white);
    padding: 12px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.sort-bar span { font-size: 0.9rem; color: var(--text-muted); }
.sort-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-body);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-body);
    transition: var(--transition);
}
.pagination a:hover, .pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============== BOOK DETAIL ============== */
.book-detail {
    padding: 40px 0;
}
.book-detail-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}
.book-detail-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.book-detail-info h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.book-detail-author {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.book-detail-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--accent);
}
.book-detail-rating span { color: var(--text-muted); font-size: 0.9rem; }
.book-detail-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.book-detail-price .current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.book-detail-price .original {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
}
.book-detail-price .discount {
    background: var(--danger);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.book-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.book-meta-item {
    font-size: 0.9rem;
    color: var(--text-body);
}
.book-meta-item strong { color: var(--text-dark); }
.book-detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.quantity-control button {
    padding: 10px 15px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.quantity-control button:hover { background: var(--border); }
.quantity-control input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 10px 0;
    font-size: 1rem;
}
.seller-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.seller-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.seller-card h4 { font-size: 0.95rem; color: var(--text-dark); }
.seller-card a { font-size: 0.85rem; }

/* Tabs */
.tabs {
    margin-top: 30px;
}
.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
}
.tab-nav button {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.tab-nav button.active {
    color: var(--primary);
}
.tab-nav button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}
.tab-content { display: none; padding: 20px 0; }
.tab-content.active { display: block; }

/* Reviews */
.review-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
}
.review-name { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); }
.review-date { font-size: 0.8rem; color: var(--text-muted); }
.review-rating { color: var(--accent); font-size: 0.85rem; margin-bottom: 5px; }
.review-text { font-size: 0.9rem; line-height: 1.6; }

/* ============== AUTH PAGES ============== */
.auth-section { padding: 50px 0; }
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}
.auth-container h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 5px;
    color: var(--text-dark);
}
.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.9rem;
}
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}
.auth-tab.active {
    color: var(--primary);
}
.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}
.form-control {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-white);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* ============== CART ============== */
.cart-section { padding: 40px 0; }
.cart-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.cart-table th {
    background: var(--primary);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.cart-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-item-info img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-item-title { font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.cart-item-author { font-size: 0.85rem; color: var(--text-muted); }
.cart-remove {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.cart-remove:hover { text-decoration: underline; }
.cart-summary {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-top: 20px;
    max-width: 380px;
    margin-left: auto;
}
.cart-summary h3 { font-family: var(--font-heading); margin-bottom: 15px; }
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i { font-size: 4rem; color: var(--border); margin-bottom: 15px; }
.empty-state h3 { font-family: var(--font-heading); margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* ============== DASHBOARD ============== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 0;
}
.dashboard-sidebar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
}
.dashboard-sidebar .user-info {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}
.dashboard-sidebar .user-info img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}
.dashboard-sidebar .user-info .avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 8px;
}
.dashboard-sidebar .user-info h4 { font-size: 1rem; color: var(--text-dark); }
.dashboard-sidebar .user-info p { font-size: 0.8rem; color: var(--text-muted); }
.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-body);
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: var(--transition);
}
.dashboard-nav a:hover, .dashboard-nav a.active {
    background: var(--bg-light);
    color: var(--primary);
}
.dashboard-nav a i { width: 20px; text-align: center; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--info); }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: var(--warning); }
.stat-icon.red { background: var(--danger); }
.stat-icon.brown { background: var(--primary); }
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Data Table */
.data-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table th {
    background: var(--bg-light);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.data-table tr:hover { background: var(--bg-cream); }
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-active, .status-paid, .status-delivered, .status-approved { background: #D4EDDA; color: #155724; }
.status-pending { background: #FFF3CD; color: #856404; }
.status-inactive, .status-cancelled { background: #F8D7DA; color: #721C24; }
.status-shipped { background: #D1ECF1; color: #0C5460; }

/* ============== ABOUT & CONTACT ============== */
.about-section { padding: 50px 0; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.about-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}
.about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}
.about-image {
    text-align: center;
    font-size: 8rem;
    color: var(--primary);
    opacity: 0.3;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}
.contact-info-cards {
    display: grid;
    gap: 15px;
}
.contact-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}
.contact-card i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-form {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.contact-form h3 { font-family: var(--font-heading); margin-bottom: 20px; }

/* ============== FOOTER ============== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.footer-logo i { color: var(--accent); font-size: 1.5rem; }
.footer-about p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 15px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.social-links a:hover { background: var(--primary); }
.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}
.footer-links a:hover { color: white; }
.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.payment-icons { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; }
.payment-icons span { font-size: 0.85rem; font-weight: 600; }

/* ============== RESPONSIVE ============== */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-text p { margin: 0 auto 25px; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    .books-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .book-detail-grid { grid-template-columns: 300px 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar-left span:last-child { display: none; }
    .header-content { gap: 15px; }
    .search-bar { display: none; }
    .mobile-menu-btn { display: block; }
    .main-nav { display: none; }
    .main-nav.show {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        z-index: 999;
    }
    .nav-links { flex-direction: column; }
    .nav-links > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.1);
        border-radius: 0;
    }
    .nav-dropdown-menu a { color: rgba(255,255,255,0.8) !important; }
    .hero { padding: 40px 0; }
    .hero-text h1 { font-size: 1.8rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .books-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .book-detail-grid { grid-template-columns: 1fr; }
    .book-detail-image { max-width: 300px; margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .cart-table { font-size: 0.85rem; }
    .cart-table th:nth-child(4), .cart-table td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
    .books-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .book-card-info { padding: 10px; }
    .book-card-title { font-size: 0.9rem; }
    .features-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 15px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
