/**
 * Main CSS file for CMU Press / Bookclusive
 * Extracted from homepage.php for better organization and caching
 */

/* ========================================
   CHECKOUT PAGE STYLES
   ======================================== */

/* Checkout Page Specific Layout */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 2rem;
}

.checkout-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.checkout-form h2 {
    color: #3b82f6;
    margin-bottom: 25px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-option.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Order Summary */
.order-summary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h2 {
    color: #3b82f6;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.item-details {
    flex: 1;
}

.item-title {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
}

.item-meta {
    font-size: 0.9em;
    color: #718096;
}

.item-price {
    font-weight: 600;
    color: #3b82f6;
}

.order-totals {
    border-top: 2px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-row.grand-total {
    font-size: 1.2em;
    font-weight: 700;
    color: #3b82f6;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 15px;
}

/* Security Notice */
.security-notice {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #065f46;
}

/* Checkout Responsive Design */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
        order: -1;
    }
}

/* ========================================
   USER LIBRARY PAGE STYLES
   ======================================== */

/* Library Page */
.library-page {
    background: var(--color-bg-secondary, #f5f5f5);
    min-height: 100vh;
}

.library-header {
    background: white;
    padding: var(--space-6, 1.5rem) 0;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
    margin-bottom: var(--space-8, 2rem);
}

.library-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6, 1.5rem);
}

.library-title h1 {
    font-size: var(--text-3xl, 1.875rem);
    font-weight: var(--font-bold, 700);
    color: var(--color-text-primary, #1f2937);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: var(--space-4, 1rem);
}

.breadcrumb a {
    color: var(--color-primary, #3b82f6);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Library Statistics */
.library-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4, 1rem);
    margin-bottom: var(--space-6, 1.5rem);
}

.stat-card {
    background: white;
    padding: var(--space-4, 1rem);
    border-radius: var(--radius-lg, 0.5rem);
    text-align: center;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
}

.stat-number {
    font-size: var(--text-2xl, 1.5rem);
    font-weight: var(--font-bold, 700);
    color: var(--color-primary, #3b82f6);
    margin-bottom: var(--space-1, 0.25rem);
}

.stat-label {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-secondary, #6b7280);
}

/* Library Controls */
.library-controls {
    background: white;
    padding: var(--space-6, 1.5rem);
    border-radius: var(--radius-lg, 0.5rem);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
    margin-bottom: var(--space-6, 1.5rem);
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 1rem);
    align-items: center;
    justify-content: space-between;
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem) var(--space-3, 0.75rem) var(--space-10, 2.5rem);
    border: 2px solid var(--color-border, #d1d5db);
    border-radius: var(--radius-sm, 0.375rem);
    font-size: var(--text-sm, 0.875rem);
    transition: border-color var(--transition-fast, 0.15s);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary, #3b82f6);
}

.search-icon {
    position: absolute;
    left: var(--space-3, 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted, #9ca3af);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-3, 0.75rem);
}

.filter-select,
.sort-select {
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    border: 2px solid var(--color-border, #d1d5db);
    border-radius: var(--radius-sm, 0.375rem);
    font-size: var(--text-sm, 0.875rem);
    background: white;
    min-width: 150px;
}

.view-toggle {
    display: flex;
    border: 2px solid var(--color-border, #d1d5db);
    border-radius: var(--radius-sm, 0.375rem);
    overflow: hidden;
}

.view-btn {
    padding: var(--space-3, 0.75rem);
    border: none;
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--color-primary, #3b82f6);
    color: white;
}

.view-btn:hover:not(.active) {
    background: var(--color-bg-secondary, #f3f4f6);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

/* Library Content */
.library-content {
    background: white;
    border-radius: var(--radius-lg, 0.5rem);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
    padding: var(--space-6, 1.5rem);
    min-height: 400px;
}

/* Book Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-6, 1.5rem);
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 1rem);
}

.book-card {
    position: relative;
    border-radius: var(--radius-lg, 0.5rem);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
    transition: all var(--transition-medium, 0.3s);
    background: white;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg, 0 10px 15px rgba(0,0,0,0.1));
}

.book-cover-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-actions {
    position: absolute;
    top: var(--space-2, 0.5rem);
    right: var(--space-2, 0.5rem);
    display: flex;
    gap: var(--space-2, 0.5rem);
    opacity: 0;
    transition: opacity var(--transition-fast, 0.15s);
}

.book-card:hover .book-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    color: white;
}

.favorite-btn {
    background: rgba(239, 68, 68, 0.9);
}

.favorite-btn.active {
    background: #EF4444;
}

.favorite-btn:hover {
    background: #EF4444;
    transform: scale(1.1);
}

.favorite-btn svg {
    width: 16px;
    height: 16px;
}

/* Progress Overlay */
.progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: var(--space-3, 0.75rem);
    color: white;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--space-2, 0.5rem);
}

.progress-fill {
    height: 100%;
    background: var(--color-success, #10b981);
    transition: width var(--transition-medium, 0.3s);
}

.progress-text {
    font-size: var(--text-xs, 0.75rem);
    text-align: center;
}

/* Book Information */
.book-info {
    padding: var(--space-4, 1rem);
}

.book-title {
    font-size: var(--text-base, 1rem);
    font-weight: var(--font-semibold, 600);
    color: var(--color-text-primary, #1f2937);
    margin-bottom: var(--space-1, 0.25rem);
    line-height: var(--leading-tight, 1.25);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: var(--space-2, 0.5rem);
}

.book-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3, 0.75rem);
}

/* Status Badges */
.status-badge {
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    border-radius: var(--radius-sm, 0.375rem);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
}

.status-unread {
    background: #F3F4F6;
    color: var(--color-text-secondary, #6b7280);
}

.status-reading {
    background: #FEF3C7;
    color: #D97706;
}

.status-completed {
    background: #D1FAE5;
    color: #059669;
}

/* Action Buttons */
.book-actions-bottom {
    display: flex;
    gap: var(--space-2, 0.5rem);
}

.btn-continue {
    flex: 1;
    background: var(--color-primary, #3b82f6);
    color: white;
    border: none;
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-sm, 0.375rem);
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-medium, 500);
    cursor: pointer;
    transition: background var(--transition-fast, 0.15s);
    text-decoration: none;
    text-align: center;
}

.btn-continue:hover {
    background: var(--color-primary-dark, #2563eb);
}

.btn-details {
    background: var(--color-bg-secondary, #f3f4f6);
    color: var(--color-text-primary, #1f2937);
    border: 2px solid var(--color-border, #d1d5db);
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-sm, 0.375rem);
    font-size: var(--text-sm, 0.875rem);
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    text-decoration: none;
}

.btn-details:hover {
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
}

/* List View */
.book-card-list {
    display: flex;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem);
    border-radius: var(--radius-lg, 0.5rem);
    border: 2px solid var(--color-border, #d1d5db);
    transition: all var(--transition-fast, 0.15s);
}

.book-card-list:hover {
    border-color: var(--color-primary, #3b82f6);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,0.1));
}

.book-cover-list {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm, 0.375rem);
    flex-shrink: 0;
}

.book-info-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-header-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2, 0.5rem);
}

.book-details-list {
    flex: 1;
}

.book-actions-list {
    display: flex;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    margin-top: var(--space-3, 0.75rem);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    margin-top: var(--space-8, 2rem);
    padding: var(--space-4, 1rem);
}

.pagination a,
.pagination span {
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border: 2px solid var(--color-border, #d1d5db);
    border-radius: var(--radius-sm, 0.375rem);
    text-decoration: none;
    color: var(--color-text-primary, #1f2937);
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-medium, 500);
    min-width: 40px;
    text-align: center;
    transition: all var(--transition-fast, 0.15s);
}

.pagination a:hover {
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
}

.pagination .current {
    background: var(--color-primary, #3b82f6);
    border-color: var(--color-primary, #3b82f6);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-12, 3rem);
    color: var(--color-text-secondary, #6b7280);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4, 1rem);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-semibold, 600);
    margin-bottom: var(--space-2, 0.5rem);
    color: var(--color-text-primary, #1f2937);
}

.empty-state p {
    margin-bottom: var(--space-6, 1.5rem);
}

/* Library Mobile Responsive */
@media (max-width: 768px) {
    .library-title {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4, 1rem);
    }

    .library-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-select,
    .sort-select {
        min-width: auto;
        flex: 1;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4, 1rem);
    }

    .book-card-list {
        flex-direction: column;
        text-align: center;
    }

    .book-cover-list {
        align-self: center;
    }

    .book-header-list {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-2, 0.5rem);
    }

    .book-actions-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Force 1 column layout in mobile for better readability */
    .main-content .books-grid,
    .catalog-content .books-grid,
    .books-grid {
        display: grid !important;
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 10px !important; /* Match homepage gap */
    }

    .book-card {
        border-radius: 8px;
        min-width: 0; /* Allow shrinking */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Add subtle shadow like homepage */
        background: white;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .book-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .book-cover,
    .book-cover-container {
        height: 300px; /* Increased height for better visibility */
        width: 100%;
        object-fit: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f0f0f0;
    }

    .book-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .book-info {
        padding: 8px; /* Consistent with homepage */
        text-align: left;
    }

    .book-title,
    .book-info h3 {
        font-size: 13px; /* Slightly larger for better readability */
        line-height: 1.3;
        margin-bottom: 4px;
        font-weight: 600;
        color: #1f2937;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 2.6em; /* Fixed height for 2 lines */
    }

    .book-author,
    .book-info .author {
        font-size: 11px; /* Consistent author text size */
        color: #6b7280;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .book-info .category {
        font-size: 9px;
        color: #9ca3af;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .book-price,
    .book-info .price {
        font-size: 13px; /* Match title size */
        font-weight: 700;
        color: #1e40af; /* Blue price color like homepage */
        margin-top: auto;
    }

    .add-to-cart-btn {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 4px;
        background: #1e40af;
        color: white;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
        margin-top: 4px;
        width: 100%;
    }

    .add-to-cart-btn:hover {
        background: #1d4ed8;
    }

    .library-stats {
        grid-template-columns: 1fr;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Thai', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* MEB Market Style Header */
.site-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar */
.header-top {
    background: rgba(0,0,0,0.1);
    padding: 8px 0;
    font-size: 14px;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contact span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-user-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-user-menu a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s;
}

.header-user-menu a:hover {
    opacity: 0.8;
}

/* Main Header */
.header-main {
    padding: 15px 0;
}

.header-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    opacity: 0.9;
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 500px;
}

.search-form {
    position: relative;
    display: flex;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #2563eb;
}

/* Cart Button */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    position: relative;
}

.cart-btn:hover {
    background: rgba(255,255,255,0.3);
}

.cart-count {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Navigation */
.header-nav {
    background: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-menu {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu li.active a {
    background: rgba(255,255,255,0.15);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Login & Account Button */
.mobile-login-btn,
.mobile-account-btn {
    display: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-login-btn:hover,
.mobile-account-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* Ensure icon color is white for mobile account button */
.mobile-account-btn,
.mobile-account-btn:link,
.mobile-account-btn:visited {
    color: white !important;
}

.mobile-account-btn i,
.mobile-login-btn i {
    color: white !important;
}

.mobile-login-btn,
.mobile-login-btn:hover {
    color: white !important;
}

/* Login Modal */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.login-modal.active {
    display: flex;
}

.login-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.login-modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #1e40af;
}

.login-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-close-btn:hover {
    color: #333;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.login-input:focus {
    border-color: #3b82f6;
}

.login-submit-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-links {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.login-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Responsive Design - MEB Market Style */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }

    .header-main-content {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 12px 15px;
        justify-content: space-between;
    }

    .logo {
        font-size: 22px;
        flex-shrink: 0;
    }

    .search-container {
        flex: 1;
        max-width: none;
        margin: 0 5px;
    }

    .header-actions {
        flex-shrink: 0;
        gap: 10px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
        flex-direction: column;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

@media (max-width: 480px) {
    .header-main-content {
        padding: 8px 10px;
        gap: 8px;
    }

    /* Hide logo on mobile like MEB Market */
    .logo {
        display: none;
    }

    /* Show mobile login & account button */
    .mobile-login-btn,
    .mobile-account-btn {
        display: flex;
    }

    .search-container {
        flex: 1;
        margin: 0 3px;
        max-width: 200px; /* Limit search box width to make room for language switcher */
    }

    .cart-btn span {
        display: none;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 40px 10px 15px;
        border-radius: 20px;
    }

    .search-btn {
        width: 32px;
        height: 32px;
        right: 4px;
    }

    /* Optimize cart button for mobile */
    .cart-btn {
        padding: 8px 15px;
        min-width: auto;
    }

    .header-actions {
        gap: 8px;
    }

    /* Mobile login modal adjustments */
    .login-modal-content {
        width: 95%;
        padding: 25px;
    }

    .login-modal-title {
        font-size: 20px;
    }
}

/* Main Content Styles */
.main-content {
    padding: 30px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Hero Section */
.hero-section {
    background: white;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #1e40af;
}

.hero-text p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.hero-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: transform 0.3s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* Book Grid */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.section-title {
    font-size: 24px;
    color: white;
    font-weight: 700;
    margin: 0;
}

.view-all {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-all:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.book-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.book-cover {
    width: 100%;
    height: 280px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    font-size: 60px;
    color: #ccc;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Colored placeholder styles */
.book-cover-placeholder.placeholder-blue {
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    color: white;
}

.book-cover-placeholder.placeholder-green {
    background: linear-gradient(135deg, #059669, #10B981);
    color: white;
}

.book-cover-placeholder.placeholder-red {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: white;
}

.book-cover-placeholder.placeholder-purple {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    color: white;
}

.placeholder-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.placeholder-content .book-initial {
    font-size: 80px;
    font-weight: bold;
    line-height: 1;
}

.placeholder-content i {
    font-size: 40px;
    opacity: 0.8;
}

.book-info {
    padding: 15px;
}

.book-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-author {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.book-price {
    color: #3b82f6;
    font-size: 18px;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #f3f4f6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Hero Section Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .hero-text p {
        font-size: 16px;
        margin-bottom: 18px;
        line-height: 1.5;
    }

    .hero-btn {
        padding: 14px 35px;
        font-size: 16px;
        border-radius: 30px;
        display: inline-block;
        margin-bottom: 20px;
    }

    .featured-books-carousel {
        max-width: 280px;
        width: 100%;
        margin: 0 auto;
    }

    .carousel-container {
        height: 350px;
        width: 100%;
    }

    .carousel-slide .book-card {
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        max-width: 100%;
    }

    .carousel-slide .book-cover {
        height: 280px;
    }

    .carousel-slide .book-info {
        padding: 12px;
    }

    .carousel-slide .book-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .carousel-slide .book-author {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .carousel-slide .book-price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .hero-content {
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .hero-text p {
        font-size: 15px;
        margin-bottom: 16px;
        line-height: 1.4;
        color: #555;
    }

    .hero-btn {
        padding: 12px 28px;
        font-size: 15px;
        border-radius: 25px;
        margin-bottom: 15px;
        min-width: 140px;
    }

    .featured-books-carousel {
        max-width: 240px;
        width: 100%;
        margin: 0 auto;
    }

    .carousel-container {
        height: 300px;
        width: 100%;
    }

    .carousel-slide .book-card {
        box-shadow: 0 3px 12px rgba(0,0,0,0.08);
        border-radius: 8px;
        max-width: 100%;
    }

    .carousel-slide .book-cover {
        height: 240px;
        border-radius: 8px 8px 0 0;
    }

    .carousel-slide .book-info {
        padding: 10px;
    }

    .carousel-slide .book-title {
        font-size: 14px;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .carousel-slide .book-author {
        font-size: 12px;
        margin-bottom: 6px;
        color: #777;
    }

    .carousel-slide .book-price {
        font-size: 15px;
        font-weight: 600;
    }
}

/* Mobile-First Hero Section Improvements */
@media (max-width: 360px) {
    .hero-section {
        padding: 15px 10px;
        margin-bottom: 10px;
    }

    .hero-content {
        gap: 15px;
    }

    .hero-text h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .hero-text p {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .hero-btn {
        padding: 10px 25px;
        font-size: 14px;
        min-width: 130px;
    }

    .featured-books-carousel {
        max-width: 200px;
        width: 100%;
        margin: 0 auto;
    }

    .carousel-container {
        height: 280px;
        width: 100%;
    }

    .carousel-slide .book-card {
        max-width: 100%;
    }

    .carousel-slide .book-cover {
        height: 220px;
    }
}

/* Featured Books Carousel */
.featured-books-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

.carousel-slide .book-card {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: white;
    margin: 0 auto;
}

.carousel-slide .book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.carousel-slide .book-cover {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f0f0f0;
}

.carousel-slide .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .book-info {
    padding: 15px;
    text-align: center;
}

.carousel-slide .book-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.carousel-slide .book-author {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.carousel-slide .book-price {
    color: #3b82f6;
    font-size: 18px;
    font-weight: bold;
}

/* Carousel Pagination */
.carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
    padding: 0 10px;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 10px;
    min-height: 10px;
}

.pagination-dot.active {
    background: #3b82f6;
    transform: scale(1.2);
}

.pagination-dot:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Desktop and Tablet Optimizations */
@media (min-width: 1200px) {
    .featured-books-carousel {
        max-width: 340px;
    }

    .carousel-container {
        height: 420px;
    }

    .carousel-slide .book-cover {
        height: 340px;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .featured-books-carousel {
        max-width: 300px;
    }

    .carousel-container {
        height: 380px;
    }

    .carousel-slide .book-cover {
        height: 300px;
    }
}

/* Enhanced Touch Targets and Accessibility */
@media (max-width: 768px) {
    .hero-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }

    .carousel-slide .book-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        transition: transform 0.2s ease-out;
    }

    .carousel-slide .book-card:active {
        transform: scale(0.98);
    }

    .pagination-dot {
        width: 12px;
        height: 12px;
        min-width: 12px;
        min-height: 12px;
        margin: 5px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
}

/* Optimized spacing for mobile sections */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 0;
    }

    .section {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 0;
    }

    .section {
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 20px;
    }

    .container {
        padding: 0 10px;
    }

    /* Mobile Books Grid - 1 Column - Homepage Specific */
    .books-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .book-card {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: white;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .book-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .book-cover {
        height: 120px;
        width: 100%;
        object-fit: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f0f0f0;
    }

    .book-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .book-cover-placeholder {
        font-size: 30px;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f0f0f0;
        color: #9ca3af;
    }

    .book-info {
        padding: 8px;
        text-align: left;
    }

    .book-title {
        font-size: 13px; /* Slightly larger for better readability */
        line-height: 1.3;
        margin-bottom: 4px;
        font-weight: 600;
        color: #1f2937;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 2.6em; /* Fixed height for 2 lines */
    }

    .book-author {
        font-size: 11px;
        margin-bottom: 4px;
        color: #6b7280;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .book-price {
        font-size: 13px; /* Match title size */
        font-weight: 700;
        color: #1e40af; /* Blue price color consistency */
        margin-top: auto;
    }
}

/* ========================================
   AUTHENTICATION PAGES STYLES
   ======================================== */

.auth-page {
    min-height: 80vh;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 40px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 28px;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 20px;
    text-decoration: none;
    display: inline-block;
}

.auth-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.valid {
    border-color: #10b981;
}

.password-toggle {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.password-toggle-btn:hover {
    color: #1a202c;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-meter {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 4px 0;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.strength-weak .strength-bar { width: 25%; background: #ef4444; }
.strength-fair .strength-bar { width: 50%; background: #f59e0b; }
.strength-good .strength-bar { width: 75%; background: #3b82f6; }
.strength-strong .strength-bar { width: 100%; background: #10b981; }

.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.form-checkbox {
    margin-right: 8px;
    margin-top: 4px;
}

.form-checkbox-label {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.5;
}

.form-checkbox-label a {
    color: #3b82f6;
    text-decoration: none;
}

.form-checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.btn-login, .btn-register {
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-login:disabled, .btn-register:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.social-login {
    margin: 24px 0;
}

.social-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.social-divider span {
    background: white;
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #1a202c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-social:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-social svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.auth-footer {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.auth-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.success-message {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    z-index: 10;
}

.back-link:hover {
    color: #3b82f6;
}

.back-link svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.verification-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.verification-notice svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .auth-page {
        padding: 20px 15px;
        min-height: 70vh;
    }

    .auth-container {
        padding: 30px 25px;
        border-radius: 15px;
    }

    .auth-title {
        font-size: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-logo {
        font-size: 24px;
    }

    .back-link {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 20px;
        justify-content: center;
    }
}

/* ========================================
   CART PAGE STYLES
   ======================================== */

.cart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.cart-title {
    font-size: 32px;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.cart-count {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.6em;
    font-weight: 500;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.message {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #059669;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-cart h2 {
    margin-bottom: 10px;
    color: #1a202c;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    align-items: center;
    border: 1px solid #e5e7eb;
}

.item-cover {
    width: 120px;
    height: 160px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-cover-placeholder {
    font-size: 40px;
    color: #cbd5e0;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.item-title a {
    color: inherit;
    text-decoration: none;
}

.item-title a:hover {
    color: #3b82f6;
}

.item-author {
    color: #6b7280;
    font-size: 14px;
}

.item-category {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-block;
    width: fit-content;
    margin: 5px 0;
}

.item-price {
    color: #059669;
    font-weight: 600;
    font-size: 16px;
    margin: 5px 0;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.quantity-btn:hover {
    background: #2563eb;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    font-weight: bold;
    background: transparent;
    color: #1a202c;
}

.item-subtotal {
    font-size: 18px;
    font-weight: bold;
    color: #059669;
    text-align: center;
}

.cart-summary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #e5e7eb;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.summary-row:last-child {
    border-bottom: none;
    font-size: 20px;
    font-weight: bold;
    color: #059669;
    margin-top: 10px;
}

.checkout-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.checkout-section .btn {
    flex: 1;
    max-width: 250px;
}

/* Cart Mobile Responsive */
@media (max-width: 768px) {
    .cart-container {
        padding: 20px;
        margin: 10px 0;
    }

    .cart-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .cart-title {
        font-size: 28px;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }

    .item-cover {
        width: 100px;
        height: 140px;
        margin: 0 auto;
    }

    .checkout-section {
        flex-direction: column;
    }

    .checkout-section .btn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 15px;
    }

    .cart-title {
        font-size: 24px;
    }

    .item-cover {
        width: 80px;
        height: 110px;
    }

    .item-title {
        font-size: 16px;
    }

    .cart-summary {
        padding: 20px;
    }

    .summary-row:last-child {
        font-size: 18px;
    }
}

/* ========================================
   USER DASHBOARD PAGE STYLES
   ======================================== */

.dashboard-page {
    background: #f5f5f5;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: #1e40af;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.user-info h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.user-info p {
    color: #6b7280;
    font-size: 14px;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-secondary {
    background: #f8fafc;
    color: #1a202c;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: white;
    border-color: #1e40af;
    color: #1e40af;
}

.btn-logout {
    background: none;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 60px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
}

.card-link {
    color: #1e40af;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.continue-reading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.continue-reading-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    transition: all 0.3s;
    background: white;
}

.continue-reading-card:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

.book-cover-continue {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.book-info-continue {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title-continue {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
    line-height: 1.3;
}

.book-author-continue {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.book-page-info {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.btn-continue-reading {
    background: #1e40af;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s;
    margin-top: auto;
}

.btn-continue-reading:hover {
    background: #1d4ed8;
}

.progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 10px;
    border-radius: 0 0 8px 8px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: white;
    text-align: center;
}

.book-card-mini-enhanced {
    display: flex;
    flex-direction: column;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s;
    background: white;
}

.book-card-mini-enhanced:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

.book-cover-container-mini {
    position: relative;
    margin-bottom: 15px;
}

.book-cover-mini {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.mini-progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 10px;
    border-radius: 0 0 8px 8px;
}

.mini-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

.book-info-mini {
    flex: 1;
    margin-bottom: 15px;
}

.book-title-mini {
    font-size: 14px;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author-mini {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.book-status {
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

.book-actions-mini {
    display: flex;
    gap: 10px;
}

.btn-mini {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
}

.btn-mini.btn-primary {
    background: #1e40af;
    color: white;
    border: 2px solid #1e40af;
}

.btn-mini.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-mini.btn-secondary {
    background: #f59e0b;
    color: white;
    border: 2px solid #f59e0b;
}

.btn-mini.btn-secondary:hover {
    background: #d97706;
    border-color: #d97706;
}

.btn-mini.btn-outline {
    background: white;
    color: #1a202c;
    border: 2px solid #e5e7eb;
}

.btn-mini.btn-outline:hover {
    border-color: #1e40af;
    color: #1e40af;
}

.achievements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-badge {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    color: #ea580c;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #fdba74;
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: #6b7280;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-action {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #1a202c;
    transition: all 0.3s;
}

.quick-action:hover {
    border-color: #1e40af;
    background: #f8fafc;
}

.quick-action svg {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    color: #1e40af;
}

.success-message {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.success-message svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Dashboard Mobile responsive */
@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .dashboard-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .continue-reading-grid {
        grid-template-columns: 1fr;
    }

    .continue-reading-card {
        flex-direction: column;
        text-align: center;
    }

    .book-cover-continue {
        align-self: center;
        margin-bottom: 15px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .book-actions-mini {
        flex-direction: column;
    }
}

/* ========================================
   USER PROFILE PAGE STYLES
   ======================================== */

.profile-page {
    background: #f5f5f5;
    min-height: 100vh;
}

.profile-header {
    background: white;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #1e40af;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.profile-title {
    font-size: 48px;
    font-weight: bold;
    color: #1a202c;
    margin: 0;
}

.profile-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 30px;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #e5e7eb;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.user-name {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.user-email {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.user-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-number {
    font-size: 20px;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

.profile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-nav li {
    margin-bottom: 10px;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    color: #1a202c;
    text-decoration: none;
    transition: all 0.3s;
}

.profile-nav a:hover,
.profile-nav a.active {
    background: #1e40af;
    color: white;
}

.profile-nav svg {
    width: 20px;
    height: 20px;
}

.profile-main {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.section {
    display: block !important;
    margin-bottom: 40px;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #1e40af;
}

.form-input.error {
    border-color: #ef4444;
}

.form-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
}

.form-checkbox label {
    font-size: 14px;
    color: #1a202c;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #1e40af;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f8fafc;
    color: #1a202c;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #1e40af;
    color: #1e40af;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.file-upload-label:hover {
    border-color: #1e40af;
    color: #1e40af;
}

.danger-zone {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.danger-zone h3 {
    color: #ef4444;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.danger-zone p {
    color: #991b1b;
    margin-bottom: 20px;
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 5px;
}

.device-details {
    font-size: 14px;
    color: #6b7280;
}

.device-current {
    background: #f0f9ff;
    border-color: #93c5fd;
}

/* Profile Mobile responsive */
@media (max-width: 768px) {
    .profile-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .profile-sidebar {
        position: static;
        order: 2;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .user-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   BOOK DETAIL PAGE STYLES
   ======================================== */

/* Additional container responsive styles for book detail */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

.breadcrumb {
    color: #6b7280;
    margin: 20px 0;
    font-size: 0.9em;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.book-detail {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.book-main {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.book-cover-large {
    width: 100%;
    height: 500px;
    background: #f8fafc;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    font-size: 8em;
    color: #cbd5e0;
}

.book-info h1 {
    font-size: 2.5em;
    color: #1a202c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.book-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 1.1em;
    align-items: flex-start;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
}

.meta-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 140px;
    flex-shrink: 0;
}

.book-category {
    background: #2563eb;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
}

.book-detail .book-price {
    font-size: 3em;
    font-weight: bold;
    color: #059669;
    margin: 20px 0;
}

.book-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
    flex: 2;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    flex: 1;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.stats-bar {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #2563eb;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9em;
}

.book-description {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
}

.book-description h3 {
    margin-bottom: 15px;
    color: #1a202c;
    font-size: 1.3em;
}

.book-description p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

.technical-specs {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.technical-specs h3 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.spec-label {
    font-weight: 500;
    color: #4a5568;
}

.spec-value {
    font-weight: 600;
    color: #1a202c;
}

.quick-preview {
    background: #f0f9ff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #bfdbfe;
}

.quick-preview h4 {
    color: #1e40af;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.preview-description {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.btn-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #2563eb;
    border-radius: 10px;
    text-decoration: none;
    color: #2563eb;
    transition: all 0.2s;
    width: fit-content;
}

.btn-preview:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.preview-icon {
    font-size: 1.2em;
}

.preview-text strong {
    display: block;
    font-weight: 600;
}

.preview-text small {
    font-size: 0.85em;
    opacity: 0.8;
}

.download-options {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.download-options h3 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
}

.download-item.sample {
    border-color: #10b981;
    background: #f0fdf4;
}

.download-item.full {
    border-color: #2563eb;
    background: #f8fafc;
}

.download-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
}

.download-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.1em;
    color: #1a202c;
}

.download-info p {
    margin: 0 0 8px 0;
    color: #64748b;
    font-size: 0.9em;
}

.download-size {
    font-size: 0.8em;
    font-weight: 600;
    color: #059669;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 12px;
}

.download-btn {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    min-width: 120px;
}

.download-btn.free {
    background: #10b981;
    color: white;
}

.download-btn.free:hover {
    background: #059669;
    transform: translateY(-1px);
}

.download-btn.premium {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    cursor: default;
}

.download-btn.premium small {
    display: block;
    font-size: 0.8em;
    color: #2563eb;
    font-weight: 600;
}

.compatibility {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.compatibility h4 {
    color: #1a202c;
    margin-bottom: 12px;
    font-size: 1em;
}

.device-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.device-item {
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    color: #374151;
}

.social-sharing {
    margin: 20px 0;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.social-sharing h4 {
    margin-bottom: 12px;
    color: #1a202c;
    font-size: 1em;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.line {
    background: #00c300;
    color: white;
}

.share-btn.copy {
    background: #6b7280;
    color: white;
}

.share-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.related-books {
    margin-top: 50px;
}

.related-books h3 {
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.related-book {
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s;
}

.related-book:hover {
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.related-cover {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-title {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.related-author {
    color: #6b7280;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.related-price {
    color: #059669;
    font-weight: bold;
}

/* MEB Market Style Price and Buy Section */
.price-buy-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.buy-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


.btn-buy-now {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}


/* Book Detail Mobile Responsive */
@media (max-width: 768px) {
    .book-detail {
        padding: 20px;
        margin: 10px 0;
    }

    .book-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .book-cover-large {
        height: 350px;
        max-width: 250px;
        margin: 0 auto;
    }

    .book-info h1 {
        font-size: 1.8em;
        text-align: center;
    }

    .book-meta {
        text-align: center;
        align-items: center;
    }

    /* Mobile responsive for MEB Market style buttons */
    .price-buy-section {
        padding: 15px;
        margin: 20px 0;
    }

    .buy-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-buy-now {
        justify-content: center;
        width: 100%;
        padding: 14px 20px;
        text-align: center;
    }


    .meta-item {
        justify-content: center;
    }

    .book-detail .book-price {
        text-align: center;
        font-size: 2.5em;
    }

    .book-actions {
        flex-direction: column;
        gap: 10px;
    }

    .quick-preview {
        text-align: center;
    }

    .btn-preview {
        margin: 0 auto;
    }

    .stats-bar {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .specs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .download-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .download-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .device-list {
        justify-content: center;
    }

    .share-buttons {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .technical-specs,
    .download-options,
    .social-sharing {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .book-detail {
        padding: 15px;
    }

    .book-info h1 {
        font-size: 1.5em;
    }

    .book-detail .book-price {
        font-size: 2em;
    }

    .meta-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-btn {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}

/* ==========================================================================
   CHECKOUT PAGE STYLES - Modern Responsive Design
   ========================================================================== */

/* Checkout Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.section-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 20px 24px;
    border-bottom: none;
}

.section-header h2,
.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Form Styles */
.checkout-form {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row:has(.form-group:only-child) {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group label i {
    color: #6b7280;
    margin-right: 6px;
    width: 16px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
}

/* Readonly input styling */
.form-group input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    border-color: #d1d5db;
}

.form-group input[readonly]:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

/* Form helper text */
.form-helper-text {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

.form-helper-text i {
    margin-right: 4px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Coupon Section */
.coupon-form {
    padding: 24px;
}

.coupon-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.coupon-input-group input {
    flex: 1;
    margin-bottom: 0 !important;
}

.btn-coupon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.btn-coupon:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.error-message {
    color: #dc2626;
    font-size: 0.9rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coupon-applied {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.coupon-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.coupon-details strong {
    color: #059669;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 4px;
}

.discount-details {
    color: #6b7280;
    font-size: 0.9rem;
}

.btn-remove {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Payment Methods */
.payment-methods {
    padding: 0;
}

.payment-option {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.payment-option:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.payment-option.selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.payment-icon {
    font-size: 2rem;
    color: #635bff;
    width: 40px;
    display: flex;
    justify-content: center;
}

.payment-details {
    flex: 1;
}

.payment-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.payment-desc {
    color: #64748b;
    font-size: 0.9rem;
}

.payment-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-secure {
    background: #635bff;
    color: white;
}

.badge-live {
    background: #22c55e;
    color: white;
}

/* Payment Features */
.payment-features {
    background: rgba(79, 70, 229, 0.03);
    border: 1px solid rgba(79, 70, 229, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 16px;
}

.features-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #475569;
    font-weight: 600;
}

.features-header i {
    color: #4f46e5;
    font-size: 1.1em;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.features-list li:last-child {
    margin-bottom: 0;
}

.features-list li i {
    color: #10b981;
    font-size: 0.9em;
    width: 16px;
}

/* Security Notice */
.security-notice {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #065f46;
    font-size: 0.95rem;
    font-weight: 500;
}

.security-notice i {
    color: #10b981;
    font-size: 1.1em;
    flex-shrink: 0;
}

/* Checkout Button */
.btn-checkout {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-checkout:active {
    transform: translateY(0);
}

/* Order Summary */
.order-summary-section {
    position: sticky;
    top: 100px;
}

.order-items {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.order-item:last-child {
    border-bottom: none;
}

.item-cover {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #94a3b8;
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.item-author {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.item-quantity {
    color: #6b7280;
    font-size: 0.85rem;
}

.item-price {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
    text-align: right;
    flex-shrink: 0;
}

/* Order Totals */
.order-totals {
    padding: 20px;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #374151;
    font-size: 1rem;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-row.discount-row {
    color: #10b981;
    font-weight: 600;
}

.total-row.grand-total {
    border-top: 2px solid #d1d5db;
    padding-top: 16px;
    margin-top: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.btn-edit-cart {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px;
    margin-bottom: 0;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-edit-cart:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    text-decoration: none;
    color: white;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.alert-success i {
    color: #10b981;
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05));
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #7f1d1d;
}

.alert-error i {
    color: #dc2626;
}

/* Page Header */
.page-header {
    text-align: center;
    margin: 40px 0;
}

.page-header h1 {
    color: #1e40af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2.5rem;
    font-weight: 700;
}

.page-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #4338ca;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 800px;
    }

    .order-summary-section {
        position: static;
        order: -1;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .checkout-layout {
        gap: 20px;
        margin-top: 20px;
    }

    .section-card {
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .section-header,
    .checkout-form,
    .coupon-form {
        padding: 16px;
    }

    .page-header {
        margin: 20px 0;
    }

    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 8px;
    }

    .coupon-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-coupon {
        width: 100%;
    }

    .payment-label {
        padding: 16px;
    }

    .payment-info {
        gap: 12px;
    }

    .payment-icon {
        font-size: 1.5rem;
        width: 30px;
    }

    .payment-badges {
        flex-direction: column;
        gap: 4px;
    }

    .order-item {
        padding: 16px;
        gap: 12px;
    }

    .item-cover {
        width: 50px;
        height: 65px;
    }

    .order-totals {
        padding: 16px;
    }

    .btn-edit-cart {
        margin: 16px;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .checkout-layout {
        margin-top: 10px;
    }

    .section-header,
    .checkout-form,
    .coupon-form {
        padding: 12px;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn-checkout {
        padding: 16px 24px;
        font-size: 1rem;
    }

    .coupon-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-item {
        padding: 12px;
    }

    .item-title {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .alert {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* ========================================
   HOMEPAGE SECTION HEADERS - HIGH PRIORITY
   ======================================== */

/* Homepage section headers with blue theme */
.section-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    padding: 16px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2) !important;
}

.section-title {
    color: white !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.view-all {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.view-all:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
