/* LawAfrica Digital Books - Main Stylesheet */
/* Color Palette: #88131F (Primary), #514E4B, #000000 */

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

:root {
    --primary-color: #88131F;
    --secondary-color: #514E4B;
    --dark-color: #000000;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-color: #333;
    --gray-text: #666;
}

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

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

/* Header */
.header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo-img {
    height: 50px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 16px;
}

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

.cart-link {
    position: relative;
    font-size: 20px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    color: var(--gray-text);
}

/* Filters Section */
.filters-section {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.search-btn {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #6b0f18;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    background-color: var(--white);
    min-width: 180px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: #6b0f18;
}

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

.btn-secondary:hover {
    background-color: #3a3835;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: var(--light-bg);
}

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--border-color);
}

.digital-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-author {
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 10px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-cart {
    padding: 8px 15px;
    font-size: 14px;
}

/* Product Detail Page */
.product-detail {
    margin-bottom: 50px;
}

.product-detail-main {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-detail-image {
    position: relative;
}

.product-detail-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.no-image-large {
    width: 100%;
    height: 500px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    color: var(--border-color);
    border-radius: 10px;
}

.digital-badge-large {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.product-detail-title {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.product-detail-author {
    font-size: 18px;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.product-detail-price {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.price-label {
    font-size: 16px;
    color: var(--gray-text);
    margin-right: 10px;
}

.price-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

.vat-info {
    font-size: 14px;
    color: var(--gray-text);
    display: block;
    margin-top: 5px;
}

.product-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    gap: 8px;
}

.meta-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.product-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-input {
    width: 80px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}

.product-highlights {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
}

.product-highlights h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-highlights ul {
    list-style: none;
}

.product-highlights li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.product-highlights li:last-child {
    border-bottom: none;
}

.product-highlights i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

.product-description {
    background-color: var(--white);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 30px;
}

.product-description h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.description-content {
    line-height: 1.8;
    color: var(--text-color);
}

.product-copyright {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
}

.related-products {
    margin-top: 50px;
}

.related-products h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

/* Cart Page */
.cart-page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart i {
    font-size: 100px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

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

.cart-table thead {
    background-color: var(--light-bg);
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-color);
}

.product-info-cart {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-product-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-no-image {
    width: 80px;
    height: 100px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 30px;
    color: var(--border-color);
}

.product-details h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.digital-label {
    font-size: 11px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
}

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

.qty-input {
    width: 60px;
    height: 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.btn-remove:hover {
    color: #a02622;
}

.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-box {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.summary-box h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
}

.summary-total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
}

.summary-note {
    text-align: center;
    font-size: 13px;
    color: var(--gray-text);
    margin: 15px 0;
}

.summary-box .btn {
    margin-top: 10px;
}

/* Checkout Page */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.billing-details h2,
.order-summary h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.required {
    color: var(--error-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.form-control.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    display: block;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.order-items {
    background-color: var(--white);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

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

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

.payment-method {
    margin: 25px 0;
}

.payment-method h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.payment-option input[type="radio"] {
    margin-top: 3px;
}

.payment-option label {
    flex: 1;
}

.payment-option p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: var(--gray-text);
}

.payment-note {
    font-size: 13px;
    color: var(--gray-text);
    margin-top: 10px;
    font-style: italic;
}

.terms-checkbox {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.terms-checkbox a {
    color: var(--primary-color);
}

/* Checkout Result Pages */
.checkout-result {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.result-icon {
    font-size: 100px;
    margin-bottom: 30px;
}

.checkout-result.success .result-icon {
    color: var(--success-color);
}

.checkout-result.failed .result-icon {
    color: var(--error-color);
}

.checkout-result h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.result-message {
    font-size: 18px;
    color: var(--gray-text);
    margin-bottom: 30px;
}

.order-details {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.order-details h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.order-details p {
    margin: 8px 0;
    font-size: 16px;
}

.result-note {
    color: var(--gray-text);
    font-style: italic;
    margin: 20px 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin: 8px 0;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color);
    color: #999;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.no-products p {
    font-size: 18px;
    color: var(--gray-text);
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

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

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-detail-main {
        grid-template-columns: 1fr;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    /* Mobile cart table */
    .cart-table {
        font-size: 14px;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        padding: 15px;
    }

    .cart-table td {
        display: block;
        text-align: right;
        padding: 10px 0;
        border-bottom: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--secondary-color);
    }

    .product-info-cart {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .product-card {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }

    .btn-cart {
        font-size: 12px;
        padding: 6px 10px;
    }

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

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

    .result-actions .btn {
        width: 100%;
    }
}

/* Clean Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo img {
    height: 50px;
    display: block;
}

/* Main Navigation */
.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #88131F;
}

/* Cart Icon */
.header-cart {
    margin-left: auto;
}

.cart-link {
    position: relative;
    color: #333;
    font-size: 22px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.cart-link:hover {
    color: #88131F;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #88131F;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-nav {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 15px;
    }
    
    .main-nav {
        display: none; /* Hide on mobile, show hamburger menu if needed */
    }
    
    .logo img {
        height: 40px;
    }
}
/* Pagination Styles */
.pagination-wrapper {
    margin: 2rem 0;
    padding: 1rem;
}

.pagination-wrapper nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-wrapper span.relative,
.pagination-wrapper a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    font-size: 0.875rem;
    color: #4b5563;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    text-decoration: none;
    transition: all 0.15s;
}

.pagination-wrapper a:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.pagination-wrapper span[aria-current="page"] span {
    background-color: #991b1b;
    color: #ffffff;
    border-color: #991b1b;
}

.pagination-wrapper span.cursor-default {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-wrapper .rounded-l-md {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.pagination-wrapper .rounded-r-md {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.pagination-wrapper svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pagination-wrapper p {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .pagination-wrapper .hidden {
        display: none !important;
    }
    
    .pagination-wrapper .sm\\:hidden {
        display: flex !important;
    }
}

@media (min-width: 640px) {
    .pagination-wrapper .sm\\:hidden {
        display: none !important;
    }
    
    .pagination-wrapper .hidden {
        display: flex !important;
    }
}

/* Fix pagination layout alignment */
.pagination-wrapper nav > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-wrapper nav > div:first-child > div:first-child {
    flex: 0 0 auto;
}

.pagination-wrapper nav > div:first-child > div:last-child {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Better spacing for the results text */
.pagination-wrapper p.text-sm {
    margin: 0;
    padding: 0.5rem 0;
}

/* Ensure pagination numbers are inline */
.pagination-wrapper span.relative.z-0 {
    display: inline-flex;
    gap: 0;
}

/* Mobile responsive fix */
@media (max-width: 640px) {
    .pagination-wrapper nav > div:first-child {
        justify-content: center;
        text-align: center;
    }
    
    .pagination-wrapper p {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
}

@media (min-width: 640px) {
    .pagination-wrapper .sm\\:flex-1 {
        flex: 1 1 0%;
    }
    
    .pagination-wrapper .sm\\:flex {
        display: flex !important;
    }
    
    .pagination-wrapper .sm\\:items-center {
        align-items: center;
    }
    
    .pagination-wrapper .sm\\:justify-between {
        justify-content: space-between;
    }
}

/* Fix page header positioning and height */
.page-header {
    background: linear-gradient(135deg, #8B1538 0%, #6B0F2A 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1rem;
}

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

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: white;
    opacity: 0.85;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1.5rem 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Fix product images - keep them at proper height without white space */
.product-image {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-card img,
.product-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: top center;
}

.product-info {
    padding: 1rem;
}

/* Fix horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    position: relative;
}

.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure no elements exceed viewport width */
* {
    max-width: 100%;
}

/* Fix specific elements that might cause overflow */
.page-header,
.filters-section,
.products-grid,
.pagination-wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 0;
    }
    
    .filters-section {
        padding: 15px;
    }
    
    /* Prevent text/images from breaking layout */
    img {
        max-width: 100%;
        height: auto;
    }
    
    .product-title,
    .product-author {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}
