/* Medical Brasil - Estilos CSS */

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

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

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

/* Header */
.header {
    background: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo {
    text-decoration: none;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
}

.search-form {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 1rem;
    outline: none;
}

.search-form button {
    padding: 12px 24px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #1e8449;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

.main-content .container {
    display: flex;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.categories-nav {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.categories-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.categories-nav a:last-child {
    border-bottom: none;
}

.categories-nav a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.categories-nav a.active {
    background: var(--primary-color);
    color: var(--white);
}

.categories-nav a.active .count {
    color: rgba(255, 255, 255, 0.8);
}

.categories-nav .count {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Products Section */
.products-section {
    flex: 1;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.section-header p {
    color: var(--text-light);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    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-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-image .no-image {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--white);
    background: var(--secondary-color);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.category-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: var(--white);
}

.category-image .no-image {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
}

.category-info {
    padding: 15px;
    text-align: center;
}

.category-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.category-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--primary-dark);
}

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

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 992px) {
    .main-content .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .categories-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .categories-nav a {
        flex: 1;
        min-width: 150px;
        text-align: center;
        justify-content: center;
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }

    .search-form {
        width: 100%;
        max-width: none;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 150px;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .category-image {
        height: 120px;
    }
}

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-info {
        padding: 10px;
    }

    .categories-nav a {
        min-width: 100%;
    }
}
