/* ==========================================================================
   Dindingwe Books — Public Site CSS ver2
   Warm bookshop aesthetic — brown, cream, green accents
   ========================================================================== */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: Georgia, 'Times New Roman', serif;
    background: #faf6f0;
    color: #222;
}

a { color: #5c3a1e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === HEADER === */
header {
    background: #1a1a2e;
    color: #fff;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
    border-bottom: 3px solid #5c3a1e;
}

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

.logo img {
    height: 42px;
    width: auto;
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    letter-spacing: .5px;
    font-family: Georgia, serif;
}

.logo h1 span {
    color: #c8a96e;
    font-style: italic;
}

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

nav a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: .9rem;
    font-family: Arial, sans-serif;
    transition: background .2s, color .2s;
}

nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
nav a.active-link { background: #5c3a1e; color: #fff; }

/* Mobile nav hamburger — simple */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* === MAIN CONTAINER === */
.main-container {
    min-height: calc(100vh - 66px - 50px);
}

/* === FOOTER === */
footer {
    background: #1a1a2e;
    color: #aaa;
    text-align: center;
    padding: 16px;
    font-size: .82rem;
    font-family: Arial, sans-serif;
    border-top: 3px solid #5c3a1e;
}

footer a { color: #c8a96e; }

/* === BREADCRUMB === */
.breadcrumb {
    font-size: .85rem;
    color: #888;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.breadcrumb a { color: #5c3a1e; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #333; }
.breadcrumb .sep { margin: 0 6px; color: #ccc; }

/* === BROWSE LAYOUT === */
.browse-wrap {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.page-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3b2207;
    margin: 0 0 6px;
    font-family: Georgia, serif;
}

.page-subheading {
    font-size: .9rem;
    color: #888;
    margin: 0 0 24px;
    font-family: Arial, sans-serif;
}

/* === CLASSIFICATION SHELF CARDS === */
.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.sub-card {
    background: #3b2207;
    border: 2px solid #c8a96e;
    border-radius: 6px;
    padding: 0;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 80px;
}

.sub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    border-color: #e8c87a;
    text-decoration: none;
}

.sub-card-inner {
    background: rgba(0,0,0,0.4);
    padding: 14px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sub-card-name {
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    font-family: Arial, sans-serif;
}

.sub-card-count {
    font-size: .75rem;
    color: #c8a96e;
    margin-top: 5px;
    font-family: Arial, sans-serif;
}

/* === BOOK LIST === */
.section-title {
    font-size: 1.1rem;
    color: #3b2207;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0c99a;
    font-family: Georgia, serif;
}

.book-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.book-card {
    background: #fff;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: box-shadow .2s;
}

.book-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.book-cover {
    width: 60px;
    flex-shrink: 0;
    text-align: center;
}

.book-cover img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #d0c0a0;
    background: #f0e8d8;
}

.book-info { flex: 1; }

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    font-family: Georgia, serif;
}

.book-title a {
    color: #1a1a2e;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}

.book-title a:hover {
    color: #5c3a1e;
    border-bottom-color: #5c3a1e;
}

.book-authors {
    font-size: .88rem;
    color: #5c3a1e;
    margin: 0 0 6px;
    font-family: Arial, sans-serif;
}

.book-meta {
    font-size: .82rem;
    color: #888;
    margin: 0 0 8px;
    font-family: Arial, sans-serif;
}

.book-desc {
    font-size: .88rem;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.5;
    font-family: Arial, sans-serif;
}

.book-price {
    font-size: 1rem;
    font-weight: 700;
    color: #2d6a4f;
    font-family: Arial, sans-serif;
}

.copy-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.badge-available {
    background: #d4edda;
    color: #155724;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
    font-family: Arial, sans-serif;
}

.badge-unavailable {
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78rem;
    font-family: Arial, sans-serif;
}

.no-books {
    color: #999;
    font-style: italic;
    padding: 20px 0;
    font-family: Arial, sans-serif;
}

/* === SEARCH PAGE === */
.search-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

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

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #d0c0a0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: Georgia, serif;
    background: #fff;
    color: #222;
}

.search-box input:focus {
    outline: none;
    border-color: #5c3a1e;
}

.search-box button {
    padding: 12px 24px;
    background: #5c3a1e;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: .95rem;
    font-family: Arial, sans-serif;
    transition: background .2s;
}

.search-box button:hover { background: #3b2207; }

.results-info {
    background: #f0e8d8;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #3b2207;
    font-family: Arial, sans-serif;
    font-size: .9rem;
    border: 1px solid #d0c0a0;
}

.no-results {
    background: #f8f4ee;
    padding: 24px;
    border-radius: 6px;
    text-align: center;
    color: #888;
    font-family: Arial, sans-serif;
    border: 1px solid #e8e0d0;
}

/* === BOOK DETAIL PAGE === */
.book-detail-wrap {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.book-detail-card {
    background: #fff;
    border: 1px solid #d0c0a0;
    border-radius: 8px;
    overflow: hidden;
}

.book-detail-header {
    background: #1a1a2e;
    color: #fff;
    text-align: center;
    padding: 14px 20px;
}

.book-detail-header h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
}

.book-detail-header p {
    margin: 4px 0 0;
    font-size: .8rem;
    color: #c8a96e;
    letter-spacing: .5px;
    font-family: Arial, sans-serif;
}

.book-detail-body {
    display: flex;
    gap: 28px;
    padding: 28px;
}

.book-detail-cover {
    width: 180px;
    flex-shrink: 0;
}

.book-detail-cover img {
    width: 180px;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #d0c0a0;
    background: #f0e8d8;
}

.book-detail-info { flex: 1; }

.detail-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    font-family: Georgia, serif;
}

.detail-authors {
    font-size: 1rem;
    color: #5c3a1e;
    margin: 0 0 12px;
    font-family: Arial, sans-serif;
}

.detail-meta {
    font-size: .85rem;
    color: #888;
    margin: 0 0 14px;
    font-family: Arial, sans-serif;
    line-height: 1.7;
}

.detail-meta strong { color: #555; }

.detail-desc {
    font-size: .92rem;
    color: #444;
    line-height: 1.7;
    margin: 0 0 16px;
}

.copies-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8e0d0;
}

.copies-title {
    font-size: .85rem;
    font-weight: bold;
    color: #3b2207;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}

.copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f4ee;
    border-radius: 5px;
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    font-size: .88rem;
}

.copy-code { color: #888; font-family: monospace; font-size: .82rem; }
.copy-condition { color: #555; }
.copy-price { font-weight: 700; color: #2d6a4f; font-size: .95rem; }
.copy-location { font-size: .78rem; color: #aaa; }

/* === AUTHORS PAGE === */
.authors-wrap {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.author-card {
    background: #fff;
    border: 1px solid #e8e0d0;
    border-radius: 6px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all .2s;
    font-family: Arial, sans-serif;
}

.author-card:hover {
    background: #f8f4ee;
    border-color: #c8a96e;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    text-decoration: none;
    transform: translateY(-2px);
}

.author-name {
    font-weight: 700;
    font-size: .95rem;
    color: #3b2207;
    margin-bottom: 4px;
}

.author-count {
    font-size: .78rem;
    color: #888;
}

/* Alpha filter bar */
.alpha-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
}

.alpha-btn {
    padding: 4px 10px;
    background: #f8f4ee;
    border: 1px solid #d0c0a0;
    border-radius: 4px;
    font-size: .82rem;
    color: #5c3a1e;
    text-decoration: none;
    font-family: Arial, sans-serif;
    transition: background .15s;
}

.alpha-btn:hover, .alpha-btn.active {
    background: #5c3a1e;
    color: #fff;
    border-color: #5c3a1e;
    text-decoration: none;
}

/* === ENQUIRY FORM === */
.enquiry-wrap {
    max-width: 620px;
    margin: 40px auto;
    padding: 0 20px;
}

.enquiry-card {
    background: #fff;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    padding: 30px;
}

.enquiry-card h2 {
    color: #3b2207;
    margin: 0 0 6px;
    font-family: Georgia, serif;
}

.enquiry-card p {
    color: #888;
    font-size: .9rem;
    margin: 0 0 24px;
    font-family: Arial, sans-serif;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    font-size: .85rem;
    color: #3b2207;
    margin-bottom: 5px;
    font-family: Arial, sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0c0a0;
    border-radius: 5px;
    font-size: .95rem;
    font-family: Georgia, serif;
    background: #fff;
    color: #222;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5c3a1e;
    background: #fdfaf6;
}

.form-group textarea { height: 130px; resize: vertical; }

.btn-submit {
    background: #5c3a1e;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background .2s;
    width: 100%;
}

.btn-submit:hover { background: #3b2207; }

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: .9rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: .9rem;
}

/* === CHEETAH MASCOT === */
.cheetah-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 200;
}

.cheetah-bubble {
    background: #fff;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    max-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(6px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    border: 1px solid #e0d5c5;
    cursor: pointer;
}

.cheetah-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cheetah-img {
    width: 80px;
    height: auto;
    animation: cheetahIdle 3s infinite;
    cursor: pointer;
}

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

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    font-family: Arial, sans-serif;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: .85rem;
    text-decoration: none;
    border: 1px solid #d0c0a0;
    color: #5c3a1e;
    background: #fff;
}

.pagination a:hover { background: #f8f4ee; text-decoration: none; }
.pagination .current { background: #5c3a1e; color: #fff; border-color: #5c3a1e; }
.pagination .disabled { color: #ccc; pointer-events: none; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    header { flex-direction: row; padding: 0 16px; }
    .nav-toggle { display: block; }
    nav { display: none; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0; background: #1a1a2e; padding: 10px; gap: 2px; }
    nav.open { display: flex; }
    nav a { padding: 10px 16px; font-size: 1rem; }
    .book-detail-body { flex-direction: column; }
    .book-detail-cover { width: 100%; text-align: center; }
    .book-detail-cover img { width: 140px; height: 200px; }
    .sub-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .authors-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
