/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Merriweather:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Merriweather', serif; 
    line-height: 1.6;
    background-color: #fdfcf6; 
    color: #3b2f2f;
}

header {
    font-family: 'Playfair Display', serif;
    background-color: #6c4a2f;
    color: #fff8dc;
    padding: 1rem;
    text-align: center;
    border-bottom: 4px solid #a63d2a; 
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
}

header p {
    font-size: 1rem;
    font-weight: 400;
}

nav {
    background-color: #e8e2d9; 
    border-bottom: 2px solid #6c4a2f;
    padding: 0.5rem;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
nav li a {
    font-family: 'Libre Baskerville', serif; 
    color: #3b2f2f;
    text-decoration: none;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}
nav li a:hover {
    color: #a63d2a;
    text-decoration: underline;
}

.type-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}
.type-buttons button {
    background-color: #a63d2a;
    color: #fff8dc;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}
.type-buttons button:hover {
    background-color: #862f22;
}

.results-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 1rem auto;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    padding: 1em;
    border: 2px solid #d4c6b0;
    border-radius: 6px;
    background-color: #f5f1e6;
}

#articles.list > article {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    border: 1px solid #d4c6b0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fffdf7;
    margin-bottom: 1rem;
    font-family: 'Merriweather', serif;
}

#articles.list > article h3 {
    color: #6c4a2f;
    font-family: 'Playfair Display', serif;
}

#articles.list > article p {
    color: #3b2f2f;
}

.article-buttons {
    display: flex;
    gap: 0.5rem;
}
.article-buttons button {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: #a63d2a;
    color: #fff8dc;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
}
.article-buttons button:hover {
    background-color: #862f22;
}

.article-photo {
    width: 180px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d4c6b0;
    flex-shrink: 0;
}

.article-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

#articles.list > article footer {
    margin-top: auto;
}

#articles.list > article footer p {
    font-size: 1.5rem;
    font-weight: bold;
    color: #a63d2a; /* accent red */
    margin-top: 0.5rem;
}

#right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.search-bar {
    background-color: #f5f1e6;
    padding: 1rem;
    border: 2px solid #d4c6b0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.search-bar input,
.search-bar select {
    padding: 0.5rem;
    border: 1px solid #b49a7d;
    border-radius: 4px;
}
.search-bar button {
    background-color: #6c4a2f;
    color: #fff8dc;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}
.search-bar button:hover {
    background-color: #862f22;
}

.search-bar .price-range {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #a63d2a;
    background-color: #fff0e6;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.search-bar .price-range label {
    font-weight: bold;
    color: #a63d2a;
}
.search-bar .price-range input {
    padding: 0.5rem;
    border: 2px solid #a63d2a;
    border-radius: 4px;
    font-weight: bold;
    background-color: #ffffff;
}

.filters {
    background-color: #f5f1e6;
    border: 1px solid #d4c6b0;
    padding: 1rem;
    border-radius: 8px;
}
.filters h3 {
    margin-bottom: 0.5rem;
    color: #6c4a2f;
    border-bottom: 1px solid #d4c6b0;
    padding-bottom: 0.25rem;
}
.filters label {
    display: block;
    margin-bottom: 0.25rem;
    color: #3b2f2f;
}

body > footer {
    margin-top: 2rem;
    background-color: #6c4a2f;
    color: #fff8dc;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-family: 'Libre Baskerville', serif;
}

.results-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto;
    gap: 1rem;
}

#left {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.type-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.type-buttons button {
    flex: 1;
    padding: 0.5rem;
    border-radius:0;
    background-color: #ffffff;
    color: #3b2f2f;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

#compra {
    padding: 1em;
    background-color: #a63d2a;
    color: #fff8dc;
    border-color: #862f22;
}

.articles-box {
    border: 2px solid #d4c6b0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fffdf7;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#articles.list {
    width: 100%;
}
#articles.list > article {
    width: 100%;
}
