/* Reset e variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores naturais/terrosas */
    --bg-primary: #f8f6f1;
    --bg-card: #ffffff;
    --bg-muted: #ebe8df;
    --text-primary: #3d3226;
    --text-secondary: #6b6356;
    --text-muted: #8a8376;
    --primary: #4a7c59;
    --primary-light: #6b9d7a;
    --border: #d4cfc0;
    --accent: #e8dcc8;
    
    --radius: 0.65rem;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
}

.header-content {
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.leaf-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 48rem;
}

/* Filtros */
.filters-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.filters-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.filter-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
}

#searchInput {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--bg-primary);
}

#searchInput:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.orixa-filters {
    margin-top: 1rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 0.2rem);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.badge:hover {
    background-color: var(--accent);
}

.badge.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Resultados */
.results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 1rem 0;
}

.loading,
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Grid de plantas */
.plantas-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.planta-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}

.planta-card:hover {
    box-shadow: var(--shadow-lg);
}

.planta-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .planta-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .planta-image {
        min-height: 180px;
        max-height: 200px;
    }
}

.planta-image {
    background-color: var(--bg-muted);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    min-height: 200px;
    max-height: 250px;
}

.planta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    padding: 1rem;
    background-color: var(--bg-muted);
}

.placeholder svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.placeholder-scientific {
    font-size: 0.625rem;
    color: var(--text-muted);
    opacity: 0.6;
    font-style: italic;
    margin-top: 0.25rem;
}

.planta-info {
    padding: 1.5rem;
}

.planta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.planta-scientific {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    font-size: 0.875rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.info-value {
    color: var(--text-secondary);
}

.orixa-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.orixa-badge {
    padding: 0.125rem 0.5rem;
    background-color: var(--accent);
    color: var(--text-primary);
    border-radius: calc(var(--radius) - 0.3rem);
    font-size: 0.75rem;
}

.origem-full {
    grid-column: 1 / -1;
}

.image-links {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.links-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.links-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 0.2rem);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.link-button:hover {
    background-color: var(--accent);
}

.link-button svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Footer */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-content p {
    margin-bottom: 1rem;
}

.footer-content strong {
    color: var(--text-primary);
}

.note {
    font-size: 0.75rem;
}

.saying {
    font-size: 0.75rem;
    font-style: italic;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .planta-content {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
}
