/* Reset e estilos base */

/* Breadcrumbs */
.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    margin-bottom: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(233, 236, 239, 0.3);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #bbb;
    margin: 0 8px;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Título principal */
.page-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout principal */
.main-content {
    display: flex;
    gap: 0;
    margin-bottom: 50px;
    align-items: flex-start;
}

/* Sidebar com categorias - Largura total */
.sidebar {
    flex: 1;
    /* background: rgba(255, 255, 255, 0.95); */
    /* backdrop-filter: blur(10px); */
    /* border-radius: 0; */
    /* box-shadow: 0 10px 40px rgba(0,0,0,0.1); */
    height: fit-content;
    position: sticky;
    top: 20px;
    /* overflow: hidden; */
    margin: 0 20px;
}

.sidebar-header {
    /* padding: 25px; */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* color: white; */
    /* text-align: center; */
}

.sidebar-header h2 {
    /* font-size: 1.8rem; */
    font-weight: 700;
    /* margin: 0; */
    /* text-shadow: 0 2px 4px rgba(0,0,0,0.3); */
}

/* Menu de categorias expansível - Estilo zebra */
.category-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Efeito zebra usando seletores de linhas pares e ímpares */
.category-item:nth-child(odd) {
    background: var(--primary-600);
}

.category-item:nth-child(even) {
    background: transparent;
}

/* Cores de texto e ícones para linhas ímpares (fundo escuro) */
.category-item:nth-child(odd) .category-text {
    color: white;
}

.category-item:nth-child(odd) .category-text::after {
    background: white;
}

.category-item:nth-child(odd) .category-icon {
    color: white;
}

/* Cores de texto e ícones para linhas pares (fundo claro) */
.category-item:nth-child(even) .category-text {
    color: #2c3e50;
}

.category-item:nth-child(even) .category-text::after {
    background: #2c3e50;
}

.category-item:nth-child(even) .category-icon {
    color: #2c3e50;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    min-height: 60px;
    background: transparent;
}

/* Texto da categoria com sublinhado */
.category-text {
    position: relative;
    font-weight: 700;
}

.category-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50%;
    height: 3px;
    border-radius: 2px;
}

/* Ícone chevron SVG */
.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-icon svg {
    width: 25px;
    height: 25px;
}

.category-header.active .category-icon {
    transform: rotate(180deg);
}

/* Estados hover para linhas ímpares (fundo escuro) */
.category-item:nth-child(odd):hover {
    /* background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); */
    /* transform: translateX(5px); */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

/* Estados hover para linhas pares (fundo claro) */
.category-item:nth-child(even):hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* transform: translateX(5px); */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

/* Conteúdo das categorias */
.category-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8f9fa;
}

.category-content.active {
    max-height: 600px;
    overflow-y: auto;
}

.product-list {
    padding: 20px 30px 0px;
}

.product-link {
    display: block;
    padding: 12px 0;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-link::before {
    /* content: '•'; */
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.product-link:hover {
    /* background: var(--primary-600); */
    /* color: #fff; */
    /* transform: translateX(10px); */
    /* background: rgba(102, 126, 234, 0.05); */
    /* padding-left: 30px; */
    /* border-radius: 5px; */
    /* text-decoration: underline; */
    font-weight: bold;
}

.product-link:last-child {
    border-bottom: none;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        flex: none;
        position: static;
        order: -1;
        margin: 0 15px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .page-header {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    h2.section-title-medicamentos {
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: var(--spacing-xl);
    line-height: 0.9em;
    letter-spacing: -1px;
    margin-top: 10px;
}
    .category-header {
        font-size: 15px;
        padding: 15px 20px;
        min-height: 50px;
    }
    
    .product-list {
        padding: 15px 20px 20px;
    }
    
    .sidebar {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .category-header {
        font-size: 14px;
        padding: 12px 15px;
        min-height: 45px;
    }
    
    .category-icon svg {
        width: 25px;
        height: 25px;
    }
}

/* Melhorias de acessibilidade */
.category-header:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Animações suaves */
.category-content {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar personalizada */
.category-content::-webkit-scrollbar {
    width: 6px;
}

.category-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.category-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.category-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}    h2.section-title-medicamentos {
        font-size: var(--font-2xl);
        font-weight: 700;
        color: var(--primary-600);
        margin-bottom: var(--spacing-xl);
        line-height: 0.9em;
        letter-spacing: -1px;
        margin-top: 10px;
    }