:root {
    --mg-primary: #5E0808;
    --mg-text-dark: #1F2937;
    --mg-text-gray: #6B7280;
    --mg-bg-light: #F9FAFB;
    --mg-border: #E5E7EB;
}

.mg-filter-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 300px;
}

.mg-filter-section {
    margin-bottom: 20px;
}

.mg-filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mg-text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.mg-filter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mg-filter-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
    user-select: none;
    transition: transform 0.2s ease;
}

.mg-filter-item:hover {
    transform: translateX(4px);
}

.mg-filter-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkmark */
.mg-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid var(--mg-border);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mg-filter-item:hover input ~ .mg-checkmark {
    border-color: var(--mg-primary);
}

.mg-filter-item input:checked ~ .mg-checkmark {
    background-color: var(--mg-primary);
    border-color: var(--mg-primary);
}

.mg-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mg-filter-item input:checked ~ .mg-checkmark:after {
    display: block;
}

.mg-term-name {
    font-size: 0.95rem;
    color: var(--mg-text-dark);
    font-weight: 500;
}

.mg-term-count {
    font-size: 0.85rem;
    color: var(--mg-text-gray);
    margin-left: 6px;
}

.mg-filter-divider {
    border: 0;
    border-top: 1px solid var(--mg-border);
    margin: 20px 0;
}

/* Button & Links */
.mg-filter-button {
    width: 100%;
    background-color: var(--mg-primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(94, 8, 8, 0.2);
}

.mg-filter-button:hover {
    background-color: #EC1313;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(94, 8, 8, 0.3);
}

.mg-filter-button:active {
    transform: translateY(0);
}

.mg-clear-filters {
    display: block;
    text-align: center;
    color: var(--mg-text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mg-clear-filters:hover {
    color: var(--mg-primary);
    text-decoration: underline;
}

/* Animation for hiding/showing brands */
.mg-marca-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mg-marca-item.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}
