/* Topal Books - main stylesheet */

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

body {
    font-family: Georgia, "Times New Roman", serif;
    background-color: #faf6f0;
    color: #2d2a26;
    line-height: 1.6;
}

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

/* ---------- Header ---------- */
header {
    background-color: #5c3a21;
    color: #fff;
    padding: 15px 0;
    border-bottom: 4px solid #c9a978;
}

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

.logo h1 {
    font-size: 26px;
    margin-bottom: 2px;
}

.logo span {
    font-size: 12px;
    color: #e6cfa8;
    font-style: italic;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    display: block;
    border-radius: 3px;
}

nav a:hover {
    background-color: #7a4f2c;
}

nav a.active {
    background-color: #c9a978;
    color: #2d2a26;
}

.menu-btn {
    display: none;
    background-color: #7a4f2c;
    color: #fff;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
}

/* ---------- Hero ---------- */
.hero {
    background-color: #c9a978;
    color: #2d2a26;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 34px;
    margin-bottom: 12px;
}

.hero p {
    font-size: 17px;
    margin-bottom: 22px;
}

.btn {
    display: inline-block;
    background-color: #5c3a21;
    color: #fff;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}

.btn:hover {
    background-color: #7a4f2c;
}

/* ---------- Page Title ---------- */
.page-title {
    background-color: #ede2cc;
    padding: 35px 0;
    text-align: center;
    border-bottom: 1px solid #d8c8a8;
}

.page-title h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

/* ---------- Featured / Book Grid ---------- */
.featured {
    padding: 50px 20px;
}

.featured h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 25px;
    margin-bottom: 40px;
}

.book-card {
    background-color: #fff;
    padding: 18px;
    border: 1px solid #e0d6c2;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.2s;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cover {
    height: 160px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    border-radius: 3px;
}

.cover-1 { background-color: #8b3a3a; }
.cover-2 { background-color: #3a5a8b; }
.cover-3 { background-color: #4a6b3a; }
.cover-4 { background-color: #8b6b3a; }

.book-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.book-card .author {
    color: #6b6053;
    font-size: 13px;
    margin-bottom: 8px;
    font-style: italic;
}

.book-card .price {
    color: #5c3a21;
    font-weight: bold;
    font-size: 15px;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    gap: 12px;
    margin: 30px 0 25px 0;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 10px 12px;
    border: 1px solid #c9b88a;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6b6053;
    display: none;
}

/* ---------- Info Row ---------- */
.info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 20px 20px 60px 20px;
}

.info-box {
    background-color: #fff;
    padding: 22px;
    border-left: 4px solid #c9a978;
    border-radius: 3px;
}

.info-box h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

/* ---------- About Page ---------- */
.about-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 40px 20px;
}

.about-text h3 {
    margin-top: 22px;
    margin-bottom: 8px;
    color: #5c3a21;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 12px;
}

.values {
    margin-left: 20px;
    margin-bottom: 12px;
}

.values li {
    margin-bottom: 5px;
}

.about-side {
    background-color: #ede2cc;
    padding: 22px;
    border-radius: 4px;
    height: fit-content;
}

.about-side h4 {
    margin-bottom: 12px;
    border-bottom: 1px solid #c9a978;
    padding-bottom: 6px;
}

.about-side p {
    margin-bottom: 8px;
    font-size: 14px;
}

/* ---------- Contact Page ---------- */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 40px 20px;
}

.contact-info {
    background-color: #ede2cc;
    padding: 22px;
    border-radius: 4px;
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 14px;
    color: #5c3a21;
}

.contact-info p {
    margin-bottom: 14px;
    font-size: 14px;
}

.contact-form {
    background-color: #fff;
    padding: 25px;
    border: 1px solid #e0d6c2;
    border-radius: 4px;
}

.contact-form h3 {
    margin-bottom: 16px;
    color: #5c3a21;
}

.form-row {
    margin-bottom: 14px;
}

.form-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 14px;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c9b88a;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    background-color: #faf6f0;
}

.form-row textarea {
    resize: vertical;
}

.form-row input.invalid,
.form-row select.invalid,
.form-row textarea.invalid {
    border-color: #b03030;
    background-color: #fdf2f2;
}

.error {
    color: #b03030;
    font-size: 13px;
    display: block;
    min-height: 18px;
    margin-top: 3px;
}

.success-message {
    margin-top: 14px;
    padding: 10px;
    background-color: #e3f0d8;
    color: #3d6320;
    border-radius: 3px;
    display: none;
}

.success-message.show {
    display: block;
}

/* ---------- Footer ---------- */
footer {
    background-color: #2d2a26;
    color: #d8c8a8;
    padding: 22px 0;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

footer p {
    margin-bottom: 4px;
}

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

    .info-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-section,
    .contact-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .menu-btn {
        display: block;
    }

    nav {
        width: 100%;
        display: none;
        margin-top: 12px;
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 4px;
    }

    nav a {
        text-align: center;
    }

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .hero h2 {
        font-size: 26px;
    }

    .hero {
        padding: 40px 20px;
    }
}

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

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